import request from '@/utils/request'

// 查询活动列表
export function listAppActivity(query) {
    return request({
        url: '/customer/v1/app/activity/page',
        method: 'post',
        data: query
    })
}

// 查询活动详细
export function getAppActivity(id, lang) {
    return request({
        url: '/customer/v1/app/activity?id=' + id + '&lang=' + lang,
        method: 'get'
    })
}

// 新增活动
export function addAppActivity(data) {
    return request({
        url: '/customer/v1/app/activity',
        method: 'post',
        data: data
    })
}

// 修改活动
export function updateAppActivity(data) {
    return request({
        url: '/customer/v1/app/activity',
        method: 'put',
        data: data
    })
}

// 删除活动
export function delAppActivity(id) {
    return request({
        url: '/customer/v1/app/activity/' + id,
        method: 'delete'
    })
}

// 翻译公告数据
export function translateAppActivity(id) {
  return request({
    url: '/customer/v1/app/activity/translate?id=' + id,
    method: 'post',
    timeout: 60 * 60 * 1000
  })
}
